﻿<Window x:Class="DataGridSample.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="DataGrid Sample" Height="350" Width="776">
    <Grid>
        <DataGrid Height="302" Width="750" HorizontalAlignment="Left" Margin="10,10,0,0" 
          Name="McDataGrid" VerticalAlignment="Top" RowHeight="30" ColumnWidth="auto" 
                  ColumnHeaderHeight="30" HeadersVisibility="Column" AlternatingRowBackground="Silver"
                  BorderBrush="Gray" BorderThickness="1" AutoGenerateColumns="False">

            <DataGrid.Columns>
                <DataGridTextColumn Header="Code" Binding="{Binding Code}" />
                <DataGridTextColumn Header="Name" Binding="{Binding Name}" />
                <DataGridTextColumn Header="Price" Binding="{Binding Price}" />
            </DataGrid.Columns>
            
            

        </DataGrid>
    </Grid>
</Window>
